package com.cn.service.server.Equipment;

import com.cn.bean.vo.Equipment.ComponentBasicInformation;
import com.cn.bean.vo.Equipment.ComponentStructureGroupComposition;
import com.cn.bean.vo.Equipment.EquipmentComponentMaterialMappingSetting;
import com.cn.bean.vo.Equipment.EquipmentStructure;
import com.cn.config.config.Result;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface EquipmentStructureService {
    List<EquipmentStructure> selectEquipmentStructure(@Param("limit") int limit, @Param("page") int page, @Param("structureCode") String structureCode, @Param("structureName") String structureName);
    List<EquipmentStructure> selectEquipmentStructureChildAll(int ID);
    Result addEquipmentStructure(@Param("businessTypeID") int businessTypeID, @Param("structureName") String structureName, @Param("versionStatus") int versionStatus, @Param("description") String description, @Param("categoryID") int categoryID, @Param("isSplit") int isSplit, @Param("isSplitLeftRight") int isSplitLeftRight,
                                 @Param("replacementCycleMethod") String replacementCycleMethod, @Param("cycleDays") String cycleDays, @Param("replacementCycleDailyOutput") BigDecimal replacementCycleDailyOutput,
                                 @Param("partAttributes") int partAttributes, @Param("upperCount") int upperCount, @Param("lowerCount") int lowerCount, @Param("leftCount") int leftCount, @Param("rightCount") int rightCount, @Param("upperLeftCount") int upperLeftCount, @Param("upperRightCount") int upperRightCount, @Param("lowerLeftCount") int lowerLeftCount, @Param("lowerRightCount") int lowerRightCount,
                                 @Param("quantity") int quantity, @Param("measurementUnit") String measurementUnit);

//    int addEquipmentStructureChile( @Param("componentID") int componentID, @Param("categoryID") int categoryID, @Param("isSplit") int isSplit, @Param("isSplitLeftRight") int isSplitLeftRight,
//                                   @Param("replacementCycleMethod") String replacementCycleMethod, @Param("cycleDays") String cycleDays, @Param("replacementCycleDailyOutput") String replacementCycleDailyOutput,
//                                   @Param("partAttributes") int partAttributes, @Param("upperCount") int upperCount, @Param("lowerCount") int lowerCount, @Param("leftCount") int leftCount, @Param("rightCount") int rightCount, @Param("upperLeftCount") int upperLeftCount, @Param("upperRightCount") int upperRightCount, @Param("lowerLeftCount") int lowerLeftCount, @Param("lowerRightCount") int lowerRightCount, @Param("upperUnit") String upperUnit, @Param("lowerUnit") String lowerUnit,
//                                   @Param("leftUnit") String leftUnit, @Param("rightUnit") String rightUnit, @Param("upperRightUnit") String upperRightUnit, @Param("lowerLefUnit") String lowerLefUnit, @Param("upperLeftUnit") String upperLeftUnit,
//                                   @Param("lowerRighUnit") String lowerRighUnit);

    List<EquipmentStructure> selectEquipmentStructureID(@Param("businessTypeID") int businessTypeID, @Param("structureName") String structureName, @Param("versionStatus") int versionStatus, @Param("description") String description);
    Result addEquipmentStructureChileChild(EquipmentStructure equipmentStructure,List<ComponentStructureGroupComposition> tableData1,List<EquipmentComponentMaterialMappingSetting> tableData2,List<ComponentBasicInformation> tableData3);

    Result deleteEquipmentStructure(List<EquipmentStructure> idList);

    //只删除子表内容
    Result deleteEquipmentStructureChileChild(int id);

    List<EquipmentStructure> selectEquipmentComponeChildID(@Param("ID") int ID);
    Result upDateEquipmentStructure(EquipmentStructure equipmentStructure,List<ComponentStructureGroupComposition> tableData1,List<EquipmentComponentMaterialMappingSetting> tableData2,List<ComponentBasicInformation> tableData3);
    Result updateEquipmentStructureMain(@Param("ID") int ID, @Param("businessTypeID") int businessTypeID, @Param("structureName") String structureName, @Param("versionStatus") int versionStatus, @Param("version") String version, @Param("description") String description);

    List<EquipmentStructure> selectAllMain(int id);
    List<EquipmentStructure> selectEquipmentStructureMainAuto1();
    List<EquipmentStructure> selectEquipmentStructureID(@Param("id") int id);

}
